﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BasePanel : MonoBehaviour
{
	public string skinPath;
	public GameObject skin;
	public PanelManager.PanelType type = PanelManager.PanelType.Panel;

	public void Init()
	{
		GameObject skinPrefab = ResManager.LoadPrefab(skinPath);
		skin = Instantiate(skinPrefab);
	}

	public void Close()
	{
		string name = GetType().ToString();
		PanelManager.Close(name);
	}

	public virtual void OnInit() { }
	public virtual void OnShow(params object[] para) { }
	public virtual void OnClose() { }
}
